import { observable, action, autorun, toJS } from 'mobx';
import * as  Apis from '../apis/govern';
import {message} from 'antd';

export class GovernAnalysisStore {

    @observable statistics = []; //子任务数据统计
    @observable
    status = {
        loading: false,
      };
    //获取督办任务信息统计
    @action
    getTaskStatistics(params){
        this.status.loading = true;
        Apis.getTaskStatistics(params).then(data=>{
          if(data.status ==1){
            this.statistics = data.statistics;
          }else{
            message.error(formData.error);
          }
          this.status.loading = false;
      }).catch(error => {
          message.error(error);
      });
    }

}
